package com.itmk.web.cart.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itmk.web.cart.entity.Cart;
import com.itmk.web.cart.mapper.CartMapper;
import com.itmk.web.cart.service.CartService;
import com.itmk.web.cart.entity.CartParm;
import com.itmk.web.goods.entity.Goods;
import org.springframework.stereotype.Service;

@Service
public class CartServiceImpl extends ServiceImpl<CartMapper, Cart> implements CartService {
    @Override
    public IPage<Goods> CartList(CartParm parm) {
        IPage<Goods> page =new Page<>(parm.getCurrentPage(),parm.getPageSize());
        return this.baseMapper.CartList(page,parm.getUserId());
    }
}
